package us.icitap.cm.ui.policecase;

import us.icitap.cm.business.entities.EntityTypeEnum;
import us.icitap.cm.business.entities.ReportTypeEnum;

import com.vaadin.ui.Tree;

public class SupplementReportTree extends Tree {

	public final static String NEW_SR = "Raport suplementar";
	public SupplementReportTree() {
		
		this.addItem(SupplementReportTree.NEW_SR);
		this.setItemCaption(SupplementReportTree.NEW_SR, ReportTypeEnum.SR.getCaption());
		
		this.addItem(ReportTypeEnum.SR);
		this.setItemCaption(ReportTypeEnum.SR, "Suplementare te meparshme");
		
		this.addItem(ReportTypeEnum.ER);
		this.setItemCaption(ReportTypeEnum.ER, ReportTypeEnum.ER.getCaption());
		
		this.addItem(EntityTypeEnum.PLACE);
		this.setItemCaption(EntityTypeEnum.PLACE, EntityTypeEnum.PLACE.getCaption());
		
		this.addItem(EntityTypeEnum.PERSON);
		this.setItemCaption(EntityTypeEnum.PERSON, EntityTypeEnum.PERSON.getCaption());
		
		this.addItem(EntityTypeEnum.DOCUMENT);
		this.setItemCaption(EntityTypeEnum.DOCUMENT, EntityTypeEnum.DOCUMENT.getCaption());
		
		this.addItem(EntityTypeEnum.VEHICLE);
		this.setItemCaption(EntityTypeEnum.VEHICLE, EntityTypeEnum.VEHICLE.getCaption());

		this.addItem(EntityTypeEnum.ITEM);
		this.setItemCaption(EntityTypeEnum.ITEM, EntityTypeEnum.ITEM.getCaption());
		
		this.addItem(EntityTypeEnum.DRUG);
		this.setItemCaption(EntityTypeEnum.DRUG, EntityTypeEnum.DRUG.getCaption());
		
		this.addItem(EntityTypeEnum.WEAPON);
		this.setItemCaption(EntityTypeEnum.WEAPON, EntityTypeEnum.WEAPON.getCaption());
		
		this.addItem(EntityTypeEnum.ORGANIZATION);
		this.setItemCaption(EntityTypeEnum.ORGANIZATION, EntityTypeEnum.ORGANIZATION.getCaption());
		
		this.addItem(EntityTypeEnum.OFFICER);
		this.setItemCaption(EntityTypeEnum.OFFICER, EntityTypeEnum.OFFICER.getCaption());
		
		this.addItem("ASSOCIATIONS");
		this.setItemCaption("ASSOCIATIONS", "Lidhjet");
		
		
		this.setParent(ReportTypeEnum.SR, SupplementReportTree.NEW_SR);
		this.setParent(ReportTypeEnum.ER, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.PLACE, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.PERSON, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.DOCUMENT, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.VEHICLE, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.DRUG, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.WEAPON, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.ITEM, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.NUMBER, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.ORGANIZATION, SupplementReportTree.NEW_SR);
		this.setParent(EntityTypeEnum.OFFICER, SupplementReportTree.NEW_SR);
		this.setParent("ASSOCIATIONS", SupplementReportTree.NEW_SR);
		
		this.expandItemsRecursively(SupplementReportTree.NEW_SR);
		this.setImmediate(true);
	}
}
